<?php

namespace app\common\model;

use think\Model;

class TaskLog extends Model
{
    protected $name = 'task_log';

    /**
     * 任务执行日志
     * @param $name 任务名称
     * @param int $staus    任务状态
     * @param string $content   任务内容
     * @param string $remarks   备注
     */
    public static function add($name,$staus = 1,$content='',$remarks = ''){
        $data = [
            'name'  =>  $name,
            'staus'  =>  $staus,
            'content'  =>  $content,
            'remarks'  =>  $remarks,
            'add_time'  =>  date('Y-m-d H:i:s',time())
        ];
        self::insert($data);
    }

}